/************************************************************************
 * @file StandardMainWindowExtension.cpp
 * @author Ian Chen
 * @version 1.0
 *
 * @section LICENSE
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
 * General Public License for more details at
 * http://www.gnu.org/licenses/lgpl.html
 *
 ************************************************************************/
#include <pluginui/extension/StandardMainWindowExtension.h>

#include <pluginui/manager/spi/StandardContentPanelManager.h>
#include <pluginui/manager/spi/StandardDockPanelManager.h>
#include <pluginui/manager/spi/StandardMenuManager.h>
#include <pluginui/manager/spi/StandardStatusBarManager.h>
#include <pluginui/manager/spi/StandardToolBarManager.h>

namespace antu
{
namespace plugin
{
namespace ui
{
StandardMainWindowExtension::StandardMainWindowExtension(QMainWindow* pMainWindow)
    : AbstractExtension(),
      m_pMainWindow(pMainWindow)
{
    this->m_pContentPanelManager = new StandardContentPanelManager(this->m_pMainWindow);
    this->m_pMenuManager = new StandardMenuManager(this->m_pMainWindow->menuBar());
    this->m_pSidePanelManager = new StandardDockPanelManager(this->m_pMenuManager, this->m_pMainWindow);
    this->m_pStatusBarManager = new StandardStatusBarManager(this->m_pMainWindow->statusBar());
    this->m_pToolBarManager = new StandardToolBarManager(this->m_pMainWindow);
}

QWidget *StandardMainWindowExtension::rootWidget()
{
    return this->m_pMainWindow;
}

}
}
}
